#region Header Licence
//  NKnobMan, Copyright 2009, Alexandre MUTEL.
// 
//  This is free software; you can redistribute it and/or modify it
//  under the terms of the GNU Lesser General Public License as
//  published by the Free Software Foundation; either version 2.1 of
//  the License, or (at your option) any later version.
// 
//  This software is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//  Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public
//  License along with this software; if not, write to the Free
//  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
//  02110-1301 USA, or see the FSF site: http://www.fsf.org.
#endregion
using System;

namespace NKnobMan
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public class KnobManFieldAttribute : Attribute
    {
        private string _name;
        private string _fromName;
        private string _toName;
        private string _animateName;
        private string _curveName;

        public KnobManFieldAttribute()
        {
        }

        public KnobManFieldAttribute(string name)
        {
            _name = name;
            _fromName = name + "1";
            _toName = name + "2";
            _animateName = name + "Anim";
            _curveName = name + "Curve";    
        }

        //public KnobManFieldAttribute(string fromName, string toName, string animateName, string curveName)
        //{
        //    _fromName = fromName;
        //    _toName = toName;
        //    _animateName = animateName;
        //    _curveName = curveName;    
        //}

        public KnobManFieldAttribute(string name, string fromName, string toName)
        {
            _name = name;
            _fromName = fromName;
            _toName = toName;
        }

        internal void SetDefault(string name)
        {
            _name = name;
            _fromName = name + "1";
            _toName = name + "2";
            _animateName = name + "Anim";
            _curveName = name + "Curve";                
        }

        public string Name
        {
            get { return _name; }
        }

        public string FromName
        {
            get { return _fromName; }
        }

        public string ToName
        {
            get { return _toName; }
        }

        public string AnimateName
        {
            get { return _animateName; }
        }

        public string CurveName
        {
            get { return _curveName; }
        }
    }
}